module view {
    
    //登陆框
    export class LoginView extends eui.Component {
        loginBtn: eui.Button
        name: string
        public constructor() {
            super()
            this.name = "loginView"
            this.addEventListener(eui.UIEvent.COMPLETE,this.onComplete,this)
            this.skinName = "resource/skin/LoginSkin.exml"
        }

        protected onComplete(): void {
            this.loginBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.login,this);
        }

        protected login(): void {
            gplayer = game.playerHandle.createPlayer(100001)
            console.log(gplayer)
            var mainView = new view.MainView()
            this.stage.addChild(mainView)
            this.stage.removeChild(this)
        }
    }
}
